def ez(k):
    for i in range(2, int(k**0.5)+1):
        if k%i==0:
            break
    else:
            return(k)
a=list(input().split())
b=['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']
s=0
for i in a:
    if i not in b:
        print("Wrong input")
        break
for j in range(10):
    if a[0] == b[j]:
            s+=j*100
    if a[1] == b[j]:
            s+=j*10
    if a[2] == b[j]:
            s+=j
            print(s)

